<template>
	<view>
		<view class="meng" v-if="wxBrowser">
			<view class="box">
				<view>1.点击右上角<image src="../../static/more.png" mode="widthFix"></image>按钮</view>
				<view>2.选择<image src="../../static/browser.png" mode="widthFix"></image>在浏览器打开</view>
				<image src="../../static/right.png" mode="widthFix" class="right"></image>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				wxBrowser: true
			}
		},
		methods: {
			isWxBrowser() {
				var ua = window.navigator.userAgent.toLowerCase();
				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
					console.log("wx") //是微信浏览器
					this.wxBrowser = true
				} else {
					console.log("nowx") //不是微信浏览器
				}
			}
		},
		onShow() {
			this.isWxBrowser()
		},
		onLoad() {}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}
	.meng{
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		background-color: rgba($color: #000000, $alpha: 0.8);
		.box{
			position: absolute;
			top: 200rpx;
			left: 20%;
			color: #FFFFFF;
			view{
				margin-top: 40rpx;
				display: flex;
				align-items: center;
			}
			image{
				width: 40rpx;
				margin: 0 10rpx;
			}
			.right{
				width: 200rpx;
				position: absolute;
				right: -210rpx;
				top: -210rpx;
				transform: rotate(15deg);
			}
		}
	}
</style>
